xen.git
14 years agotools/x86_64: Fix cpuid() inline asm to not clobber stack's red zone
Keir Fraser [Fri, 2 Dec 2011 14:31:14 +0000 (06:31 -0800)]
tools/x86_64: Fix cpuid() inline asm to not clobber stack's red zone

Pushing stuff onto the stack on x86-64 when we do not specify
-mno-red-zone is unsafe. Since the complicated asm is due to register
pressure on i386, we simply implement an all-new simpler alternative
for x86-64.

Signed-off-by: Keir Fraser <keir@xen.org>
Acked-by: Jan Beulich <jbeulich@novell.com>
14 years agox86/mm: remove 0x55 debug pattern from M2P table
Tim Deegan [Fri, 2 Dec 2011 14:07:52 +0000 (06:07 -0800)]
x86/mm: remove 0x55 debug pattern from M2P table

It's not really any more useful than explicitly setting new M2P
entries to the invalid value.

Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
14 years agoAMD IOMMU v2: minor cleanup
Jan Beulich [Fri, 2 Dec 2011 13:22:47 +0000 (14:22 +0100)]
AMD IOMMU v2: minor cleanup

Despite this array living in an __init function, having such be an
automatic variable is rather inefficient in terms of generated code.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Wang2 <wei.wang2@amd.com>
14 years agox86-64/mmcfg: remove __initdata annotation overlooked in 23749:e8d1c8f074ba
Jan Beulich [Fri, 2 Dec 2011 08:05:26 +0000 (09:05 +0100)]
x86-64/mmcfg: remove __initdata annotation overlooked in 23749:e8d1c8f074ba

Signed-off-by: Jan Beulich <jbeulich@suse.com>
14 years agoSupport of xl sched-sedf
Juergen Gross [Mon, 28 Nov 2011 12:37:17 +0000 (13:37 +0100)]
Support of xl sched-sedf

Supports the xl subcommand sched-sedf.
The man page is only a minimal version (copy from xm man page without
examples). BTW: the xm man page seems not to be in sync with xm sched-sedf -h
regarding the time units. I used milliseconds in the xl implementation.
Only minimal semantical checks of parameters.

Signed-off-by: juergen.gross@ts.fujitsu.com
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
14 years agoCorrect error message in libxl_sched_credit_domain_get()
Juergen Gross [Mon, 28 Nov 2011 12:31:37 +0000 (13:31 +0100)]
Correct error message in libxl_sched_credit_domain_get()

Just a typo...

Signed-off-by: juergen.gross@ts.fujitsu.com
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
14 years agoSupport of xl sched-credit2
Juergen Gross [Mon, 28 Nov 2011 12:31:27 +0000 (13:31 +0100)]
Support of xl sched-credit2

Supports the xl subcommand sched-credit2.

Signed-off-by: juergen.gross@ts.fujitsu.com
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
14 years agoSupport cpupools in xl sched-credit
Juergen Gross [Mon, 28 Nov 2011 12:27:15 +0000 (13:27 +0100)]
Support cpupools in xl sched-credit

Adds cpupool awareness to output of xl sched-credit. Output can now be
restricted to a specific cpupool. The domains are printed for each cpupool
seperately.

The loop over cpupools and domains is seperated from the main command
implementation to be able to support other schedulers as well.

Signed-off-by: juergen.gross@ts.fujitsu.com
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
14 years agoxl sched-credit: support long options
Juergen Gross [Mon, 28 Nov 2011 12:23:31 +0000 (13:23 +0100)]
xl sched-credit: support long options

The help text of xl sched-credit supported long options. Neither the man page
nor the implementation did.

Signed-off-by: juergen.gross@ts.fujitsu.com
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
14 years agoxend: insufficient quoting in tapdisk
Philipp Hahn [Thu, 1 Dec 2011 18:30:29 +0000 (18:30 +0000)]
xend: insufficient quoting in tapdisk

insufficient quoting between "tap-ctl list" and xend/server/BlktapController.py

BlktapController splits the output into lines using \n, then each line
at each space, and finally each of these 'words' at the '=', which
fails if the filename contains spaces.

As a quick work-around, the attached patch fixes the problem for me. That is,
until tap-ctl changes it's output format.

A more permanent solution would be to add proper quoting / escaping to tap-ctl
and un-quoting / de-escaping  to BlktapController.py

Signed-off-by: Philipp Hahn <hahn@univention.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotools: init.d/Linux/xencommons: load evtchn and gntdev modules
Olaf Hering [Thu, 1 Dec 2011 18:28:18 +0000 (18:28 +0000)]
tools: init.d/Linux/xencommons: load evtchn and gntdev modules

There is currently no code in the kernel to trigger autoload of the
evtchn or gntdev drivers. Load them manually during xencommons start.
Handle both pvops and xenlinux module names.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotools: init.d/Linux/xencommons: run script only when needed
Olaf Hering [Thu, 1 Dec 2011 18:27:42 +0000 (18:27 +0000)]
tools: init.d/Linux/xencommons: run script only when needed

Currently xencommons prints an error that /proc/xen/capabilities does
not exist when started on a non-xen kernel.

Update the xencommons script to run only when needed:
- do not run if /proc/xen does not exist
- check if /proc/xen/capabilities exists before doing the grep for dom0

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agoUpdate QEMU_TAG
Ian Jackson [Thu, 1 Dec 2011 18:26:45 +0000 (18:26 +0000)]
Update QEMU_TAG

14 years agolibxc: Fix checks on grant notify arguments
Daniel De Graaf [Thu, 1 Dec 2011 18:20:12 +0000 (18:20 +0000)]
libxc: Fix checks on grant notify arguments

The notify offset and event channels are both unsigned variables, so
testing for >= 0 will not correctly detect the use of -1 to indicate
the field is unused. Remove the useless comparison and replace with
correct range checks or comparisons to -1.

Reported-by: Anil Madhavapeddy <anil@recoil.org>
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agomerge
Tim Deegan [Thu, 1 Dec 2011 18:15:51 +0000 (18:15 +0000)]
merge

14 years agoTeach xenpaging to use the new and non-racy xc_mem_paging_load interface
Andres Lagar-Cavilla [Thu, 1 Dec 2011 18:14:24 +0000 (18:14 +0000)]
Teach xenpaging to use the new and non-racy xc_mem_paging_load interface

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Tim Deegan <tim@xen.org>
14 years agoTools: Libxc wrappers to automatically fill in page oud page contents on prepare
Andres Lagar-Cavilla [Thu, 1 Dec 2011 18:14:24 +0000 (18:14 +0000)]
Tools: Libxc wrappers to automatically fill in page oud page contents on prepare
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Tim Deegan <tim@xen.org>
14 years agoAfter preparing a page for page-in, allow immediate fill-in of the page contents
Andres Lagar-Cavilla [Thu, 1 Dec 2011 18:14:24 +0000 (18:14 +0000)]
After preparing a page for page-in, allow immediate fill-in of the page contents

p2m_mem_paging_prep ensures that an mfn is backing the paged-out gfn, and
transitions to the next state in the paging state machine for that page.
Foreign mappings of the gfn will now succeed. This is the key idea, as
it allows the pager to now map the gfn and fill in its contents.

Unfortunately, it also allows any other foreign mapper to map the gfn and read
its contents. This is particularly dangerous when the populate is launched
by a foreign mapper in the first place, which will be actively retrying the
map operation and might race with the pager. Qemu-dm being a prime example.

Fix the race by allowing a buffer to be optionally passed in the prep
operation, and having the hypervisor memcpy from that buffer into the newly
prepped page before promoting the gfn type.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
14 years agolibxl: Introduce migrate with the new QEMU.
Anthony PERARD [Thu, 1 Dec 2011 18:09:43 +0000 (18:09 +0000)]
libxl: Introduce migrate with the new QEMU.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
14 years agolibxl: libxl__qmp_migrate
Anthony PERARD [Thu, 1 Dec 2011 18:09:42 +0000 (18:09 +0000)]
libxl: libxl__qmp_migrate

This command works in two steps. First, a fd is sent to QEMU through the QMP
socket. And then, the second command "migrate" use the fd previously sent to
ask QEMU to save its states.

This comes with an alternative qmp_send function that can send a fd.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
14 years agolibxl: split libxl__qmp_send
Anthony PERARD [Thu, 1 Dec 2011 18:09:42 +0000 (18:09 +0000)]
libxl: split libxl__qmp_send

This patch prepares for the next patch, that will introduce an
alternative send function.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
14 years agoUpdate QEMU_TAG
Ian Jackson [Thu, 1 Dec 2011 18:04:13 +0000 (18:04 +0000)]
Update QEMU_TAG

14 years agoMake the prototype of p2m_mem_access_resume consistent
Andres Lagar-Cavilla [Thu, 1 Dec 2011 17:58:17 +0000 (17:58 +0000)]
Make the prototype of p2m_mem_access_resume consistent

Signed-off-by: Adin Scannell <adin@scannell.ca>
Signed-off-by: Keir Fraser <keir@xen.org>
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
14 years agoMerge
Ian Jackson [Thu, 1 Dec 2011 17:26:48 +0000 (17:26 +0000)]
Merge

14 years agotools/ocaml: Release the global lock during some hypercalls
Jonathan Davies [Thu, 1 Dec 2011 17:25:39 +0000 (17:25 +0000)]
tools/ocaml: Release the global lock during some hypercalls

Since libxc is re-entrant, there is no need for the OCaml bindings to
prevent more than one thread from entering libxc concurrently.

Previously, the OCaml bindings had prevented re-entrancy by not using
caml_{enter,leave}_blocking_section in the C stubs. The absence of
these calls meant that the global lock remained held during
hypercalls. This caused multi-threaded applications to completely lock
up during long-running hypercalls.

Calls to these functions were present but commented out in the OCaml
bindings some years ago when libxc was not fully re-entrant.

Instead, we now do call caml_{enter,leave}_blocking_section in all the
places it used to be commented out, meaning that the global lock is
released during those hypercalls. We also no longer assert the
XC_OPENFLAG_NON_REENTRANT flag when calling xc_interface_open because
the caller no longer does re-entrancy prevention at those places.

This patch has now gone through a XenRT nightly test; no problems were
observed.

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agomerge
Tim Deegan [Thu, 1 Dec 2011 17:24:12 +0000 (17:24 +0000)]
merge

14 years agox86/mm: Fix checks during foreign mapping of paged pages
Andres Lagar-Cavilla [Thu, 1 Dec 2011 17:21:24 +0000 (17:21 +0000)]
x86/mm: Fix checks during foreign mapping of paged pages

Check that the valid mfn is the one we are mapping, not the
mfn of the page table of the foreign domain.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
14 years agox86/mm: Ensure maps used by nested hvm code cannot be paged out
Andres Lagar-Cavilla [Thu, 1 Dec 2011 17:21:24 +0000 (17:21 +0000)]
x86/mm: Ensure maps used by nested hvm code cannot be paged out

The nested hvm code maps pages of the guest hvm. These maps live beyond
a hypervisor entry/exit pair, and thus their liveness cannot be ensured
with get_gfn/put_gfn critical sections. Ensure their liveness by
increasing the page ref count, instead.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
14 years agox86: Add conversion from a xen map to an mfn
Andres Lagar-Cavilla [Thu, 1 Dec 2011 17:21:24 +0000 (17:21 +0000)]
x86: Add conversion from a xen map to an mfn

This conversion is a trivial invocation of virt_to_mfn in 64 bits.
In 32 bits it uses the linear_map.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
14 years agox86/microcode: enable boot time (pre-Dom0) loading
Jan Beulich [Thu, 1 Dec 2011 16:57:54 +0000 (17:57 +0100)]
x86/microcode: enable boot time (pre-Dom0) loading

Largely as a result of the continuing resistance of Linux maintainers
to accept a microcode loading patch for pv-ops Xen kernels, this
follows the suggested route and provides a means to load microcode
updates without the assistance of Dom0, thus also addressing eventual
problems in the hardware much earlier.

This leverages the fact that via the multiboot protocol another blob
of data can be easily added in the form of just an extra module. Since
microcode data cannot reliably be recognized by looking at the
provided data, this requires (in the non-EFI case) the use of a
command line parameter ("ucode=<number>") to identify which of the
modules is to be parsed for an eventual microcode update (in the EFI
case the module is being identified in the config file, and hence the
command line argument, if given, will be ignored).

This required to adjust the XSM module determination logic accordingly.

The format of the data to be provided is the raw binary blob already
used for AMD CPUs, and the output of the intel-microcode2ucode utility
for the Intel case (either the per-(family,model,stepping) file or -
to make things easier for distro-s integration-wise - simply the
concatenation of all of them).

In order to not convert the spin_lock() in microcode_update_cpu() (and
then obviously also all other uses on microcode_mutex) to
spin_lock_irqsave() (which would be undesirable for the hypercall
context in which the function also runs), the boot time handling gets
done using a tasklet (instead of using on_selected_cpus()).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
14 years agox86: consolidate microcode loading code
Jan Beulich [Thu, 1 Dec 2011 16:55:26 +0000 (17:55 +0100)]
x86: consolidate microcode loading code

- memory was leaked on a CPU offline/online cycle (including S3)
- memory was leaked on AMD systems when microcode_update() ran a 2nd
  time with the same data that was used on the first run
- microcode never got restored on APs during S3 resume (or post-boot
  onlining of a CPU that was also online when microcode_update() first
  ran [in the event the prior microcode update got lost intermediately,
  which supposedly shouldn't happen]); this will still be the case when
  no other online CPU has an identical signature (which however is now
  consistent with bringing up such a CPU the very first time)
- resume was unimplemented in the AMD case
- there was a race between microcode_update_cpu() and
  microcode_resume_cpu()

This also moves vendor specific type declarations to the vendor source
file and sets the stage for boot time microcode loading (i.e. without
Dom0 involvement).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
14 years agoxl: Apply CLOEXEC to the restore_fd.
Anthony Perard [Thu, 1 Dec 2011 16:28:51 +0000 (16:28 +0000)]
xl: Apply CLOEXEC to the restore_fd.

At restore time, the file descriptor opened on the migration state file is
still open in the device model. Let's apply FD_CLOEXEC to it.

This patch provides libxl_fd_set_cloexec to users of libxl, instead of keeping
this function internal.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agoxl.pod.1: add a note about autoballoon and dom0_mem
Stefano Stabellini [Thu, 1 Dec 2011 16:26:36 +0000 (16:26 +0000)]
xl.pod.1: add a note about autoballoon and dom0_mem

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: add a refence to http://wiki.xen.org/xenwiki/ReportingBugs
Stefano Stabellini [Thu, 1 Dec 2011 16:26:36 +0000 (16:26 +0000)]
xl.pod.1: add a refence to wiki.xen.org/xenwiki/ReportingBugs

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: remove AUTHORS section
Stefano Stabellini [Thu, 1 Dec 2011 16:26:35 +0000 (16:26 +0000)]
xl.pod.1: remove AUTHORS section

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: improve description of virtual device subcommands
Stefano Stabellini [Thu, 1 Dec 2011 16:26:35 +0000 (16:26 +0000)]
xl.pod.1: improve description of virtual device subcommands

Add a reference to xl-disk-configuration and xl-network-configuration.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: remove dry-run option from create and cpupool-create
Stefano Stabellini [Thu, 1 Dec 2011 16:26:35 +0000 (16:26 +0000)]
xl.pod.1: remove dry-run option from create and cpupool-create

there is already a global dry-run option, there is no point in adding
another one for each subcommand

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: improve the description of pci-list-assignable-devices
Stefano Stabellini [Thu, 1 Dec 2011 16:26:34 +0000 (16:26 +0000)]
xl.pod.1: improve the description of pci-list-assignable-devices

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: improve the description of the info subcommand
Stefano Stabellini [Thu, 1 Dec 2011 16:26:34 +0000 (16:26 +0000)]
xl.pod.1: improve the description of the info subcommand

also update the example

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: improve the debug-keys subcommand description
Stefano Stabellini [Thu, 1 Dec 2011 16:26:34 +0000 (16:26 +0000)]
xl.pod.1: improve the debug-keys subcommand description

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: introduce a TO BE DOCUMENTED section
Stefano Stabellini [Thu, 1 Dec 2011 16:26:33 +0000 (16:26 +0000)]
xl.pod.1: introduce a TO BE DOCUMENTED section

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: state when a subcommand is only available to HVM guests
Stefano Stabellini [Thu, 1 Dec 2011 16:26:33 +0000 (16:26 +0000)]
xl.pod.1: state when a subcommand is only available to HVM guests

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: better description for the sysreq subcommand
Stefano Stabellini [Thu, 1 Dec 2011 16:26:32 +0000 (16:26 +0000)]
xl.pod.1: better description for the sysreq subcommand

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: state when a command requires PV drivers installed
Stefano Stabellini [Thu, 1 Dec 2011 16:26:32 +0000 (16:26 +0000)]
xl.pod.1: state when a command requires PV drivers installed

Remove an old incorrect comment about vcpu-set requiring cooperation
from the guest.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: add a reference to create in the -e option
Stefano Stabellini [Thu, 1 Dec 2011 16:26:32 +0000 (16:26 +0000)]
xl.pod.1: add a reference to create in the -e option

Add a reference to the create subcommand in the description of
the -e option to unpause and migrate.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: remove the two FIXME
Stefano Stabellini [Thu, 1 Dec 2011 16:26:31 +0000 (16:26 +0000)]
xl.pod.1: remove the two FIXME

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: order subcommands alphabetically
Stefano Stabellini [Thu, 1 Dec 2011 16:26:31 +0000 (16:26 +0000)]
xl.pod.1: order subcommands alphabetically

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: add a description of the global options
Stefano Stabellini [Thu, 1 Dec 2011 16:26:31 +0000 (16:26 +0000)]
xl.pod.1: add a description of the global options

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: improve create documentation
Stefano Stabellini [Thu, 1 Dec 2011 16:26:30 +0000 (16:26 +0000)]
xl.pod.1: improve create documentation

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: add a description of console options
Stefano Stabellini [Thu, 1 Dec 2011 16:26:30 +0000 (16:26 +0000)]
xl.pod.1: add a description of console options

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agoxl.pod.1: add a barebone description of tmem commands
Stefano Stabellini [Thu, 1 Dec 2011 16:26:30 +0000 (16:26 +0000)]
xl.pod.1: add a barebone description of tmem commands

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agotools: Switch to system libaio (again)
Ian Jackson [Thu, 1 Dec 2011 16:18:58 +0000 (16:18 +0000)]
tools: Switch to system libaio (again)

The test system problems which prompted 24233:a9c67c2daf4b (itself a
tiny partial revert of 24184:4ecd3615e726 / 24186:7aa5838499d1) have
now been resolved, we think.  So revert 24233.

Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agodocs: implement uniq instead of depending on List::MoreUtils
Ian Campbell [Thu, 1 Dec 2011 16:05:51 +0000 (16:05 +0000)]
docs: implement uniq instead of depending on List::MoreUtils

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agoremus: command line switch to enable/disable checkpoint compression
Shriram Rajagopalan [Thu, 1 Dec 2011 15:36:51 +0000 (15:36 +0000)]
remus: command line switch to enable/disable checkpoint compression

Add a command line switch to remus script that allows the user to
enable or disable checkpoint compression in the libxc code.

Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Acked-by: Brendan Cully <brendan@cs.ubc.ca>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotools/libxc: Remus Checkpoint Compression
Shriram Rajagopalan [Thu, 1 Dec 2011 15:36:15 +0000 (15:36 +0000)]
tools/libxc: Remus Checkpoint Compression

Instead of sending dirty pages of guest memory as-is, use a simple compression
algorithm that sends a RLE-encoded XOR of the page against its last sent copy.
A small LRU cache is used to hold recently dirtied pages. Pagetable pages are
sent as-is, as they are canonicalized at sender side and uncanonicalized at
receiver.

[ Fixed up a conflict in sg_save_restore.h.  I had to increase the
  ID values used from -11 and -12 to -12 and -13 because -11 had
  been taken by ..._HVM_VIRIDIAN in the meantime. -iwj ]

Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Acked-by: Brendan Cully <brendan@cs.ubc.ca>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotools/libxc: introduce xc_memalign in xc_{minios,linux,solaris,netbsd}.c
Shriram Rajagopalan [Thu, 1 Dec 2011 15:35:02 +0000 (15:35 +0000)]
tools/libxc: introduce xc_memalign in xc_{minios,linux,solaris,netbsd}.c

Move (page aligned) buffer allocations in {os}_privcmd_alloc_hypercall_buffer
into a global function xc_memalign. This API is also used by Remus
compression code to allocate compression caches that need to be page aligned.

Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Brendan Cully <brendan@cs.ubc.ca>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agovvmx: fix intended assignment
Jan Beulich [Thu, 1 Dec 2011 15:24:19 +0000 (15:24 +0000)]
vvmx: fix intended assignment

From what I can tell, this was supposed to be an assignment (not warned
about by the compiler due to -Wno-unused, which is about to be removed).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
14 years agoRevert 24283:3bc4dfb54666
Tim Deegan [Thu, 1 Dec 2011 15:07:46 +0000 (15:07 +0000)]
Revert 24283:3bc4dfb54666

This fixes the 32-bit build

Signed-off-by: Tim Deegan <tim@xen.org>
14 years agox86/mm: Allow pages typed as log dirty to also be shared
Andres Lagar-Cavilla [Thu, 1 Dec 2011 14:56:43 +0000 (14:56 +0000)]
x86/mm: Allow pages typed as log dirty to also be shared

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
14 years agoTools: Add libxc wrapper for p2m audit domctl
Andres Lagar-Cavilla [Thu, 1 Dec 2011 14:56:43 +0000 (14:56 +0000)]
Tools: Add libxc wrapper for p2m audit domctl

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Tim Deegan <tim@xen.org>
14 years agox86/mm: Rework stale p2m auditing
Andres Lagar-Cavilla [Thu, 1 Dec 2011 14:56:42 +0000 (14:56 +0000)]
x86/mm: Rework stale p2m auditing

The p2m audit code doesn't even compile, let alone work. It also
partially supports ept. Make it:

- compile
- lay groundwork for eventual ept support
- move out of the way of all calls and turn it into a domctl. It's
  obviously not being used by anybody presently.
- enable it via said domctl

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
14 years agox86: Add conversion from a xen map to an mfn
Andres Lagar-Cavilla [Thu, 1 Dec 2011 14:21:28 +0000 (14:21 +0000)]
x86: Add conversion from a xen map to an mfn

This conversion is a trivial invocation of virt_to_mfn in 64 bits.
In 32 bits it uses the linear_map.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
14 years agox86/mm: Don't lose track of the log dirty bitmap
Tim Deegan [Thu, 1 Dec 2011 14:17:16 +0000 (14:17 +0000)]
x86/mm: Don't lose track of the log dirty bitmap

hap_log_dirty_init unconditionally sets the top of the log dirty
bitmap to INVALID_MFN. If there had been a bitmap allocated, it is
then leaked, and the host crashes on an ASSERT when the domain is
cleaned up.

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Committed-by: Tim Deegan <tim@xen.org>
14 years agox86/mm: Don't trigger unnecessary shadow scans on p2m entry update
Andres Lagar-Cavilla [Thu, 1 Dec 2011 14:17:15 +0000 (14:17 +0000)]
x86/mm: Don't trigger unnecessary shadow scans on p2m entry update

When updating a p2m entry, the hypervisor scans all shadow pte's to find
mappings of that gfn and tear them down. This is avoided if the page count
reveals that there are no additional mappings. The current test ignores the
PGC_allocated flag and its effect on the page count.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Signed-off-by: Adin Scannell <adin@scannell.ca>
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
14 years agoTools: When passing no bitmap for the shadow log dirty bitmap clean up, we should...
Andres Lagar-Cavilla [Thu, 1 Dec 2011 14:17:14 +0000 (14:17 +0000)]
Tools: When passing no bitmap for the shadow log dirty bitmap clean up, we should not get EFAULT

This is due to a stale check for guest_handle_null in the hypervisor,
which doesn't necessarily work with the hypercall buffers.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Tim Deegan <tim@xen.org>
14 years agoX86: implement PCID/INVPCID for hvm
Liu, Jinsong [Thu, 1 Dec 2011 11:24:06 +0000 (12:24 +0100)]
X86: implement PCID/INVPCID for hvm

This patch handle PCID/INVPCID for hvm:

For hap hvm, we enable PCID/INVPCID, since no need to intercept
INVPCID, and we just set INVPCID non-root behavior as running natively;

For shadow hvm, we disable PCID/INVPCID, otherwise we need to emulate
INVPCID at vmm by setting INVPCID non-root behavior as vmexit.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
14 years agoX86: Disable PCID/INVPCID for dom0
Liu, Jinsong [Thu, 1 Dec 2011 11:22:43 +0000 (12:22 +0100)]
X86: Disable PCID/INVPCID for dom0

PCID (Process-context identifier) is a facility by which a logical
processor may cache information for multiple linear-address spaces.
INVPCID is an new instruction to invalidate TLB. Refer latest Intel SDM
http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html

We disable PCID/INVPCID for dom0 and pv. Exposing them into dom0 and pv
may result in performance regression, and it would trigger GP or UD
depending on whether platform suppport INVPCID or not.

This patch disables PCID/INVPCID for dom0.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
14 years agoX86: expose Intel new features to dom0
Liu, Jinsong [Thu, 1 Dec 2011 11:21:24 +0000 (12:21 +0100)]
X86: expose Intel new features to dom0

This patch expose Intel new features to dom0, including
FMA/AVX2/BMI1/BMI2/LZCNT/MOVBE.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
14 years agox86/emulator: cleanup
Jan Beulich [Thu, 1 Dec 2011 07:51:35 +0000 (08:51 +0100)]
x86/emulator: cleanup

Utilize some of the additions in the prior patches to clean up other
code:
- keep track of REP prefixes in only one variable
- use REX_W in a few more places (instead of a literal number)

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
14 years agox86/emulator: properly handle lzcnt and tzcnt
Jan Beulich [Thu, 1 Dec 2011 07:50:49 +0000 (08:50 +0100)]
x86/emulator: properly handle lzcnt and tzcnt

These instructions are prefix selected flavors of bsf and bsr
respectively, and hence the presences of the F3 prefix must be handled
in the emulation code in order to avoid running into problems on newer
CPUs.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -1058,6 +1058,9 @@ static bool_t vcpu_has(
     return rc == X86EMUL_OKAY;
 }

+#define vcpu_has_lzcnt() vcpu_has(0x80000001, ECX,  5, ctxt, ops)
+#define vcpu_has_bmi1()  vcpu_has(0x00000007, EBX,  3, ctxt, ops)
+
 #define vcpu_must_have(leaf, reg, bit) \
     generate_exception_if(!vcpu_has(leaf, reg, bit, ctxt, ops), EXC_UD, -1)
 #define vcpu_must_have_mmx()  vcpu_must_have(0x00000001, EDX, 23)
@@ -4357,13 +4360,24 @@ x86_emulate(
         dst.val   = (uint8_t)src.val;
         break;

-    case 0xbc: /* bsf */ {
-        int zf;
+    case 0xbc: /* bsf or tzcnt */ {
+        bool_t zf;
         asm ( "bsf %2,%0; setz %b1"
               : "=r" (dst.val), "=q" (zf)
-              : "r" (src.val), "1" (0) );
+              : "r" (src.val) );
         _regs.eflags &= ~EFLG_ZF;
-        if ( zf )
+        if ( (rep_prefix == REPE_PREFIX) && vcpu_has_bmi1() )
+        {
+            _regs.eflags &= ~EFLG_CF;
+            if ( zf )
+            {
+                _regs.eflags |= EFLG_CF;
+                dst.val = op_bytes * 8;
+            }
+            else if ( !dst.val )
+                _regs.eflags |= EFLG_ZF;
+        }
+        else if ( zf )
         {
             _regs.eflags |= EFLG_ZF;
             dst.type = OP_NONE;
@@ -4371,13 +4385,28 @@ x86_emulate(
         break;
     }

-    case 0xbd: /* bsr */ {
-        int zf;
+    case 0xbd: /* bsr or lzcnt */ {
+        bool_t zf;
         asm ( "bsr %2,%0; setz %b1"
               : "=r" (dst.val), "=q" (zf)
-              : "r" (src.val), "1" (0) );
+              : "r" (src.val) );
         _regs.eflags &= ~EFLG_ZF;
-        if ( zf )
+        if ( (rep_prefix == REPE_PREFIX) && vcpu_has_lzcnt() )
+        {
+            _regs.eflags &= ~EFLG_CF;
+            if ( zf )
+            {
+                _regs.eflags |= EFLG_CF;
+                dst.val = op_bytes * 8;
+            }
+            else
+            {
+                dst.val = op_bytes * 8 - 1 - dst.val;
+                if ( !dst.val )
+                    _regs.eflags |= EFLG_ZF;
+            }
+        }
+        else if ( zf )
         {
             _regs.eflags |= EFLG_ZF;
             dst.type = OP_NONE;

14 years agox86/emulator: add emulation of SIMD FP moves
Jan Beulich [Thu, 1 Dec 2011 07:49:31 +0000 (08:49 +0100)]
x86/emulator: add emulation of SIMD FP moves

Clone the existing movq emulation to also support the most fundamental
SIMD FP moves.

Extend the testing code to also exercise these instructions.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
14 years agox86/emulator: generalize movq emulation (SSE2 and AVX variants)
Jan Beulich [Thu, 1 Dec 2011 07:48:14 +0000 (08:48 +0100)]
x86/emulator: generalize movq emulation (SSE2 and AVX variants)

Extend the existing movq emulation to also support its SSE2 and AVX
variants, the latter implying the addition of VEX decoding. Fold the
read and write cases (as most of the logic is identical), and add
movntq and variants (as they're very similar).

Extend the testing code to also exercise these instructions.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
14 years agoxenpaging: Fix c/s 23507:0a29c8c3ddf7 ("update machine_to_phys_mapping[] during page...
Keir Fraser [Thu, 1 Dec 2011 00:59:58 +0000 (16:59 -0800)]
xenpaging: Fix c/s 23507:0a29c8c3ddf7 ("update machine_to_phys_mapping[] during page deallocation")

This patch clobbers page owner in free_heap_pages() before we are
finished using it. This means that a subsequent test to determine
whether it is safe to avoid safety TLB flushes incorrectly always
determines that it is safe to do so.

The fix is simple: we can defer the original patch's work until after
we are done with the page-owner field.

Thanks to Christian Limpach for spotting this one.

Signed-off-by: Keir Fraser <keir@xen.org>
14 years agohvmloader: Write address of VM generation id buffer into xenstore
Paul Durrant [Wed, 30 Nov 2011 15:18:11 +0000 (07:18 -0800)]
hvmloader: Write address of VM generation id buffer into xenstore

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
14 years agoFree d->mem_event on domain destruction.
Keir Fraser [Wed, 30 Nov 2011 15:12:41 +0000 (07:12 -0800)]
Free d->mem_event on domain destruction.

Signed-off-by: Keir Fraser <keir@xen.org>
14 years agomem_event: move mem_event_domain out of struct domain
Olaf Hering [Wed, 30 Nov 2011 15:08:53 +0000 (07:08 -0800)]
mem_event: move mem_event_domain out of struct domain

An upcoming change may increase the size of mem_event_domain. The result
is a build failure because struct domain gets larger than a page.
Allocate the room for the three mem_event_domain members at runtime.

v2:
 - remove mem_ prefix from members of new struct

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Keir Fraser <keir@xen.org>
14 years agox86/hvm/vmx: Trace traps and realmode exits
George Dunlap [Wed, 30 Nov 2011 15:06:24 +0000 (07:06 -0800)]
x86/hvm/vmx: Trace traps and realmode exits

Add some more tracing to vmexits that don't currently have
trace information:
 * VMX realmode emulation
 * Various VMX traps
 * Fast-pathed APIC accesses

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
14 years agohvmloader: Add xenstore-write support
Paul Durrant [Wed, 30 Nov 2011 14:57:20 +0000 (06:57 -0800)]
hvmloader: Add xenstore-write support

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
14 years agohvmloader: Add snprintf()
Paul Durrant [Wed, 30 Nov 2011 14:55:31 +0000 (06:55 -0800)]
hvmloader: Add snprintf()

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
14 years agohvmloader: Allocate an 8 byte buffer to contain the VM generation id
Paul Durrant [Wed, 30 Nov 2011 14:53:36 +0000 (06:53 -0800)]
hvmloader: Allocate an 8 byte buffer to contain the VM generation id
and populate it at boot time with a value read from
"platform/generation_id". Also add code to libxl to populate this
xenstore key with the value of a new 'generation_id' parameter in the
VM config file.  Populate the ADDR package of VM_Gen_Counter ACPI
device such that the first integer evaluates to the low order 32 bits
of the buffer address and the second integer evaluates to the high
order 32 bits of the buffer address.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
14 years agohvmloader: Add 'ctype' infrastructure
Paul Durrant [Wed, 30 Nov 2011 14:50:45 +0000 (06:50 -0800)]
hvmloader: Add 'ctype' infrastructure

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
14 years agohvmloader: Add an ACPI device exposing a package called ADDR,
Paul Durrant [Wed, 30 Nov 2011 14:47:16 +0000 (06:47 -0800)]
hvmloader: Add an ACPI device exposing a package called ADDR,
evaluating to two integers, and with _CID and _DDN set to
"VM_Gen_Counter".

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
14 years agox86/hvm: Re-instate HVM IRQ debug code and add keyhandler.
Paul Durrant [Wed, 30 Nov 2011 14:42:04 +0000 (06:42 -0800)]
x86/hvm: Re-instate HVM IRQ debug code and add keyhandler.

I found this patch useful a couple of times while trying to debug the
viridian problem.  irq_dump() was #ifdef-ed out so this patch puts it
back and registers a handler on the 'I' key to iterate over all HVM
domains and call it.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
14 years agox86/cpuidle: add Westmere-EX support to hw residencies reading logic
Jan Beulich [Wed, 30 Nov 2011 09:23:41 +0000 (10:23 +0100)]
x86/cpuidle: add Westmere-EX support to hw residencies reading logic

This is in accordance with
http://software.intel.com/en-us/articles/intel-processor-identification-with-cpuid-model-and-family-numbers/

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Haitao Shan <maillists.shan@gmail.com>
14 years agodoc: Update MMU_NORMAL_PT_UPDATE about the val.
Konrad Rzeszutek Wilk [Tue, 29 Nov 2011 18:30:39 +0000 (13:30 -0500)]
doc: Update MMU_NORMAL_PT_UPDATE about the val.

The val is used as the pagetable entry with the machine
frame number and some page table bits. This explains
what those page table bits are.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
14 years agodoc: Update MMU_NORMAL_PT_UPDATE requirements.
Konrad Rzeszutek Wilk [Tue, 29 Nov 2011 17:02:01 +0000 (12:02 -0500)]
doc: Update MMU_NORMAL_PT_UPDATE requirements.

There are some implicit requirements when using the hypercall
which are not mentioned.

Mainly the requirement that the pagetable be RO.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
14 years agodocs: improve index.html generation
Ian Campbell [Tue, 29 Nov 2011 16:23:27 +0000 (16:23 +0000)]
docs: improve index.html generation

Include hypercall documentation, fixing link generation for top level links to
use the INDEX.

Allow subsection links to be renamedi in the INDEX too.

Strip .txt suffixes as well as .html ones by moving the regex to the right
place instead of placing the literal text "(?:html|txt)" into the backlink to
the top level page. (oops)

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agodocs/html/: Arrange for automatic build of hypercall docs
Ian Jackson [Tue, 29 Nov 2011 15:48:08 +0000 (15:48 +0000)]
docs/html/: Arrange for automatic build of hypercall docs

- Use index.html rather than a stamp file.
- Automatically generate dependencies.
- Wire into the docs build system

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agodocs/html/: Generate an "index.html" for hypercall docs
Ian Jackson [Tue, 29 Nov 2011 15:48:07 +0000 (15:48 +0000)]
docs/html/: Generate an "index.html" for hypercall docs

Generate an "index.html" containing various useful links.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agodocs/html/: Annotations for two hypercalls
Ian Jackson [Tue, 29 Nov 2011 15:48:07 +0000 (15:48 +0000)]
docs/html/: Annotations for two hypercalls

Add annotations for a couple of the hypercalls:
 HYPERVISOR_set_trap_table
 HYPERVISOR_mmu_update

We do this by
 * annotating the list of #defines for hypercall numbers
 * annotating the list of error values
 * providing a function prototype for the systematically-named functions
The header generator does the rest.

This exercise revealed a couple of infelicities:
 * In the actual source code, do_mmu_update is defined to return an int
   and do_set_trap_table a long.  However both functions return either
   -Efoo (on error) or 0 for success.
 * The error numbers are defined only in the private header file
   xen/include/xen/errno.h and then only with names which will
   typically clash with other projects.  It would be nice to include a
   public version of this header which defines XEN_E*.  But for now
   we run xen-headers on errno.h too.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agodocs/html/: Initial cut of header documentation massager
Ian Jackson [Tue, 29 Nov 2011 15:48:06 +0000 (15:48 +0000)]
docs/html/: Initial cut of header documentation massager

"xen-headers" generates HTML from header files.  So far this generates
just some type cross-references, if you say
   make -C docs html/hypercall/stamp

An index page, proper wiring into the build system, and a few more
annotations in the headers, and will be forthcoming.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
14 years agodocs: improve documantion of xl's viridian option
Ian Campbell [Tue, 29 Nov 2011 14:19:59 +0000 (14:19 +0000)]
docs: improve documantion of xl's viridian option

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
14 years agodocs: xlexample.hvm: mention the viridian setting.
Ian Campbell [Tue, 29 Nov 2011 14:17:27 +0000 (14:17 +0000)]
docs: xlexample.hvm: mention the viridian setting.

Turning this on for Windows guests is recommended.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
14 years agodocs: install txt files as html
Ian Campbell [Tue, 29 Nov 2011 14:17:27 +0000 (14:17 +0000)]
docs: install txt files as html

A browser will display them just fine.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
14 years agoxl: make bootloader_args a list
Ian Campbell [Tue, 29 Nov 2011 15:21:23 +0000 (15:21 +0000)]
xl: make bootloader_args a list

This is much more natural. Continue to support the old syntax in xl
but deprecate it.

[ Fixed up a long line in xl_cmdimpl.c. -iwj ]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxlu: add xlu_cfg_get_list_as_string_list
Ian Campbell [Tue, 29 Nov 2011 14:17:27 +0000 (14:17 +0000)]
libxlu: add xlu_cfg_get_list_as_string_list

Returns a cfg list as a libxl_string_list.

Use this to simplify the parsing of device model extra args.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
14 years agodocs: move user and interface .tex documents under reference.
Ian Campbell [Tue, 29 Nov 2011 14:17:27 +0000 (14:17 +0000)]
docs: move user and interface .tex documents under reference.

Taking over the top level "user" entry with a relatively obsolete document is a
bit of an annoyance but these docs are not so out of date that they should be
deleted. Move them out of the top-level instead.

(the original motivation here was to allow for user/xl-domain-cfg.markdown but
we have since decided to go with man/xl.cfg.pod.5 instead so perhaps this is a
waste of time)

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
14 years agodocs: generate an index for the html output
Ian Campbell [Tue, 29 Nov 2011 14:17:27 +0000 (14:17 +0000)]
docs: generate an index for the html output

nb: I'm not a Perl wizard...

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
14 years agodocs: tweak markup and wording of qemu upstream doc slightly
Ian Campbell [Tue, 29 Nov 2011 14:17:27 +0000 (14:17 +0000)]
docs: tweak markup and wording of qemu upstream doc slightly

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
14 years agodocs: remove non-breaking spaces from sedf_scheduler_mini-HOWTO.txt
Ian Campbell [Tue, 29 Nov 2011 15:18:18 +0000 (15:18 +0000)]
docs: remove non-breaking spaces from sedf_scheduler_mini-HOWTO.txt

This document contains several 0xa0 characters (non-breaking spaces). These do
not display correctly in (some) terminals or when the document is rendered by (some)
browsers. Re-encode them as spaces.

I'm not confident that this change will make it through being encoded as a patch
and sent through email. Its effect can be replicated with:

perl -i -p -e 's/\xa0/ /g' docs/misc/sedf_scheduler_mini-HOWTO.txt

[ I ran the rune rather than trying to apply the patch -iwj ]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>